import 'dart:convert';

import 'package:beautiful_demo/common/base/http.dart';
import 'package:beautiful_demo/common/empty.dart';
import 'package:flutter/services.dart';

import 'list_bean.dart';

///description:首页
class HomeHttp {
  //首页
  Future<ListBean> httpList() async {
    const url="/store/home";
    final para=<String,String>{};
    return ListBean(await httpGet(url, para));
  }

  //banner广告(凑数)
  Future<ListBean> httpBanner() async {
    const url="/test/banner";
    var json=const JsonDecoder().convert(homeJson);
    return ListBean(json);
  }
  //商品广告(凑数)
  Future<ListBean> httpGoodsList() async {
    const url="/test/goods_list";
    var json=const JsonDecoder().convert(homeJson);
    return ListBean(json);
  }
}

